import java.net.*;
import java.io.*;

public class Client
{
	public static void main(String [] args){
		Socket mySocket;
		BufferedReader in;

		try{
			mySocket = new Socket("localhost", 1234);
			in = new BufferedReader(new InputStreamReader(mySocket.getInputStream()));
			String fromServer = in.readLine();
			System.out.println(fromServer);

		}
		catch(UnknownHostException e){
			System.err.println("khong xac dinh duoc host");
			System.exit(1);
		}
		catch(IOException e){
			System.err.println("");
		}
	}
}